package com.gildedrose.item;

import com.gildedrose.vo.Quality;

public class AgedBrie extends ItemAdapter {
    public AgedBrie(int sellIn, Quality quality) {
        super("Aged Brie", sellIn, quality);
    }

    // "Aged Brie"的品质`Quality`会随着时间推移而提高
    @Override
    public void updateQuality() {
        if (quality < 50) {
            quality = quality + 1;
        }
    }

    @Override
    public void updateQualityStale() {
        if (sellIn < 0) {
            if (quality < 50) {
                quality = quality + 1;
            }
        }
    }
}
